package com.app.util;

import java.util.HashMap;
import java.util.Map;

import com.app.entity.Customer;
import com.app.service.CustomerService;
import com.github.pagehelper.PageInfo;

public class CustomerFun {
	public PageInfo<Customer> show(int start,int limit) {
		CustomerService customerServiceImpl = (CustomerService)SpringContextUtil.getBean("customerServiceImpl");
		Map<String, Object> queryMap = new HashMap<String, Object>();
		queryMap.put("start", start == 0 ? 1 : start);
		queryMap.put("limit", limit == 0 ? 2 : limit);
		PageInfo<Customer> pageInfo = customerServiceImpl.selectAllCustomer(queryMap);
		return pageInfo;
	}
}
